package com.zjitc.controller;

import com.zjitc.service.UserService;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/4/23 16:25
 * @description:
 */
@Controller
public class ShowIndexController {

  @RequestMapping("/showIndex")
  public ModelAndView index() {
    ModelAndView modelAndView = new ModelAndView();
    modelAndView.setViewName("WEB-INF/homepage/index.jsp");
    return modelAndView;
  }
  @RequestMapping("/buycar")
  public ModelAndView buycar() {
    ModelAndView modelAndView = new ModelAndView();
    modelAndView.setViewName("WEB-INF/homepage/buycar.jsp");
    return modelAndView;
  }
  @RequestMapping("/simulation")
  public ModelAndView simulation() {
    ModelAndView modelAndView = new ModelAndView();
    modelAndView.setViewName("WEB-INF/homepage/simulation.jsp");
    return modelAndView;
  }
  @RequestMapping("/registsuccess")
  public ModelAndView registsuccess() {
    ModelAndView modelAndView = new ModelAndView();
    modelAndView.setViewName("/user/success.jsp");
    return modelAndView;
  }
  //carPageList汽车分页
  @RequestMapping("/carPageList")
  public ModelAndView carPageList() {
    ModelAndView modelAndView = new ModelAndView();
    modelAndView.setViewName("WEB-INF/homepage/buycar.jsp");
    return modelAndView;
  }
  @RequestMapping("/addproduct")
  public ModelAndView addproduct() {
    ModelAndView modelAndView = new ModelAndView();
    modelAndView.setViewName("WEB-INF/homepage/cart.jsp");
    return modelAndView;
  }
  @RequestMapping("/productdetails")
  public ModelAndView productdetails() {
    ModelAndView modelAndView = new ModelAndView();
    modelAndView.setViewName("WEB-INF/homepage/productdetails.jsp");
    return modelAndView;
  }
  @RequestMapping("/topayment")
  public ModelAndView topayment() {
    ModelAndView modelAndView = new ModelAndView();
    modelAndView.setViewName("WEB-INF/homepage/payment.jsp");
    return modelAndView;
  }
  @RequestMapping("/userCenterUI")
  public ModelAndView userCenterUI(){
    ModelAndView modelAndView = new ModelAndView();
    modelAndView.setViewName("WEB-INF/homepage/payment.jsp");
    return modelAndView;
  }
  //submitUI
  @RequestMapping("/submitUI")
  public ModelAndView submitUI(){
    ModelAndView modelAndView = new ModelAndView();
    modelAndView.setViewName("WEB-INF/homepage/cart.jsp");
    return modelAndView;
  }
  @RequestMapping(value = "/submitPathUI")
  public ModelAndView submitPathUI(){
    ModelAndView modelAndView=new ModelAndView();
    modelAndView.setViewName("/mall/submitpath.jsp");
    return modelAndView;
  }
  /*@RequestMapping(value = "/payment")
  public ModelAndView payment(Order orders){
    ModelAndView modelAndView=new ModelAndView();
    Order orders1= UserService.findOrderByOid(orders.getOid());
    double total=orders1.getTotal();
    String totals=String.valueOf(total);
    modelAndView.addObject("total",totals);
    modelAndView.addObject("oid",orders.getOid());
    modelAndView.setViewName("/alipay/alipay.trade.page.pay.jsp");
    return modelAndView;
  }*/

}
